let x,y,w,cw,ch;
while(x * w < cw){
  y=0;
  while((y+1)*w<ch){
    if((x+y)%2!=0){
      console.log(x,y);
    }
    y++
  }
  x++
}
